package com.doform.android.xianggucheng.bean.request_bean;

import com.doform.android.xianggucheng.help.AppHelp;
import com.google.gson.Gson;

/**
 * 作者 Y_MS
 * Created by ${APEN} on 2017-07-31.
 * GitHub：https://github.com/cxydxpx
 */

public class ReqListArticleBean {

//    pageid 	是 	string 	页数：1
//    pagesize 	是 	string 	单页显示数量：20
//    debug 	是 	string 	开启：true
//    key 	否 	string 	商品名称
//    skeytype 	否 	string 	1：模糊查询

    private Boolean debug = AppHelp.getInstance().Debug;
    private String skeytype = "1";
    private String key;
    private String clsid;
    private String state;
    private String pageid;
    private String pagesize = "20";

    public ReqListArticleBean(String pageid, String key) {
        if (pageid == null) {
            throw new IllegalArgumentException("pageid can't be null");
        }
        this.key = key;
        this.pageid = pageid;
    }

    public ReqListArticleBean(String pageid, String key, String state) {
        this.pageid = pageid;
        this.key = key;
        this.state = state;
    }

    public ReqListArticleBean(String pageid, String key, String categoryId, String state) {
        this.pageid = pageid;
        this.key = key;
        this.clsid = categoryId;
        this.state = state;
    }


    public String getSkeytype() {
        return skeytype;
    }

    public void setSkeytype(String skeytype) {
        this.skeytype = skeytype;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getClsid() {
        return clsid;
    }

    public void setClsid(String clsid) {
        this.clsid = clsid;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setPageid(String pageid) {
        this.pageid = pageid;
    }

    public void setPagesize(String pagesize) {
        this.pagesize = pagesize;
    }

    public void setDebug(Boolean debug) {
        this.debug = debug;
    }

    public String getPageid() {
        return pageid;
    }

    public String getPagesize() {
        return pagesize;
    }

    public Boolean getDebug() {
        return debug;
    }


    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
